home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume90 / midi / midistuf / part01
Encoding:
Internet Message Format  |  1990-10-11  |  57.1 KB

  1. Path: abcfd20.larc.nasa.gov!amiga-request
  2. From: amiga-request@abcfd20.larc.nasa.gov (Amiga Sources/Binaries Moderator)
  3. Subject: v90i275: MIDIstuff 1.0 - midi tool package, Part01/01
  4. Reply-To: "Carlo 'Lynx' v. Loesch " <loesch@lan.informatik.tu-muenchen.dbp.de>
  5. Newsgroups: comp.sources.amiga
  6. Message-ID: <comp.sources.amiga:v90i275@abcfd20.larc.nasa.gov>
  7. Date: 11 Oct 90 00:14:31 GMT
  8. Approved: tadguy@uunet.UU.NET (Tad Guy)
  9. X-Mail-Submissions-To: amiga@uunet.uu.net
  10. X-Post-Discussions-To: comp.sys.amiga
  11.  
  12. Submitted-by: "Carlo 'Lynx' v. Loesch " <loesch@lan.informatik.tu-muenchen.dbp.de>
  13. Posting-number: Volume 90, Issue 275
  14. Archive-name: midi/midistuff-1.0/part01
  15.  
  16. [ a uuencoded private library and two power window files enclosed.
  17.   see comp.binaries.amiga for executables  ...tad ]
  18.  
  19. This is the MIDIstuff package, 4 modules that make use of the MidiLib.
  20. MIDIkeys displays incoming notes on a piano keyboard and simulates a
  21. piano keyboard on the Amiga keyboard.  MIDIrec is a simple MIDI
  22. Recorder, very simple, MIDIdump is a very simple SystemExclusive
  23. storage utility and the MIDIclock is an unreliable Clock generator :-)
  24.  
  25. #!/bin/sh
  26. # This is a shell archive.  Remove anything before this line, then unpack
  27. # it by saving it into a file and typing "sh file".  To overwrite existing
  28. # files, type "sh file -c".  You can also feed this as standard input via
  29. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  30. # will see the following message at the end:
  31. #        "End of archive 1 (of 1)."
  32. # Contents:  PRO_README README lib lib/ynx.lib.uu src src/ClockPOW.c
  33. #   src/MAKEFILE src/MIDIclock.c src/MIDIclock.uu src/MIDIdump.c
  34. #   src/MIDIkeys.c src/MIDIrec.POW.uu src/MIDIrec.c src/RecPOW.c
  35. # Wrapped by tadguy@abcfd20 on Wed Oct 10 20:14:29 1990
  36. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  37. if test -f 'PRO_README' -a "${1}" != "-c" ; then 
  38.   echo shar: Will not clobber existing file \"'PRO_README'\"
  39. else
  40. echo shar: Extracting \"'PRO_README'\" \(3310 characters\)
  41. sed "s/^X//" >'PRO_README' <<'END_OF_FILE'
  42. XM    I    D    I    S    T    U    F    F
  43. X~    ~    ~    ~    ~    ~    ~    ~    ~
  44. X
  45. X    Release 1.0 - - - MIDIstuff part I - - - Date: 16 Aug 1990
  46. X            PROGRAMMER'S README
  47. X
  48. XList of files the sources package should include:
  49. X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  50. XREADME        Same as with binaries package
  51. XPRO_README    Additional info and copyright notice
  52. X
  53. Xlib        Compiler libraries used with MIDIstuff, MANX library format.
  54. Xlib/ynx.lib    Some simple routines of mine, sources can be obtained from me.
  55. X        The MIDI.lib and A.lib (ARP) are *not* included here, get
  56. X        yourself the current releases of it, and hope my stuff
  57. X        cooperates! :-)
  58. X
  59. Xsrc/ClockPOW.c        Powerwindows output of MIDIclock.POW
  60. Xsrc/MAKEFILE
  61. Xsrc/MIDIclock.c
  62. Xsrc/MIDIclock.POW    Powerwindows file for MIDIclock
  63. Xsrc/MIDIdump.c
  64. Xsrc/MIDIkeys.c
  65. Xsrc/MIDIrec.c
  66. Xsrc/MIDIrec.POW        Powerwindows file for MIDIrec
  67. Xsrc/RecPOW.c        Powerwindows output of MIDIrec.POW
  68. X
  69. XCOPYRIGHT NOTICE
  70. X The sources package is placed into freeware, which in my eyes means that
  71. X you are free to use and copy the package and modify it for own private
  72. X purposes, any commercial purposes need my permission.
  73. X
  74. XCONTACT
  75. X I'd really like to be in contact with anyone who wants to work on this
  76. X software, I *do* want to work with others, so if you have suggestions /
  77. X improvements / bug fixes send'em right up to me. If you post things into
  78. X NetNews I might not notice. My address is in the other README. Every
  79. X help will be acknowledged when included with future releases.
  80. X
  81. XBUGS
  82. X Here's some additional information for MIDI programmers about the
  83. X
  84. XMIDIclock    V1.0    "MIDI Clock Generator"
  85. X~~~~~~~~~
  86. X Sometimes the MIDIclock goes into overhead, i tried to
  87. X react trying to flush timer requests and starting anew, but
  88. X somehow requests can survive and after some time hang up
  89. X the machine, as a warning the clock toggles the power led
  90. X everytime an overhead is detected, I guess the whole thing
  91. X should be replaced by accuracy calculations, well, they're
  92. X there, they just don't do what they're supposed to. One
  93. X more problem, the prop gadget doesn't work the way it
  94. X should, too! Avoid moving it while the clock is started!
  95. X
  96. X    #define's
  97. X     ~~~~~~~~
  98. X    VBLANK:        use the VBLANK unit instead of MICROHZ
  99. X    OVERHEAD_HANDLE    enable the little overhead checking routine
  100. X    ACCURACY    try to be more accurate by time calculations
  101. X    CLOCKPRIO    the task priority of the clock, or undefine it.
  102. X
  103. XFuture enhancements:    (hopefully, if I can afford the time...)
  104. X The next thing to do is a "Human Feel" Quantizer for the MIDI Recorder,
  105. X this might surprise you, since such a feature is only to be found with
  106. X the best sequencer packages, but I currently use quite good sequencer
  107. X software on the C64 (!) called SuperTrack, the human quantize is the
  108. X feature I miss most on that program, I already wrote a "Groove" Quantizer
  109. X in BASIC (!), but it's a drag, so this is what I want to have next!
  110. X Then I will look into structure enhancements hoping to create the
  111. X "Lord of Sequence" that I have been fantasizing about for years, a
  112. X really complex MIDI Sequencer, the first to be "ShareWare" (!) I hope!
  113. X Btw, I wonder if anyone wrote that "Graphic MIDI Router" the programmer
  114. X of the midi.library was dreaming about in his "Simple MIDI Route" program.
  115. X
  116. XFINALLY...
  117. X This package was developed on an Amy 500 with Harddisk & 1M FastRAM.
  118. X I wonder if it worx under Kick 2.0...
  119. X
  120. X
  121. X(*lynx*)
  122. END_OF_FILE
  123. if test 3310 -ne `wc -c <'PRO_README'`; then
  124.     echo shar: \"'PRO_README'\" unpacked with wrong size!
  125. fi
  126. chmod +x 'PRO_README'
  127. # end of 'PRO_README'
  128. fi
  129. if test -f 'README' -a "${1}" != "-c" ; then 
  130.   echo shar: Will not clobber existing file \"'README'\"
  131. else
  132. echo shar: Extracting \"'README'\" \(7437 characters\)
  133. sed "s/^X//" >'README' <<'END_OF_FILE'
  134. X    M    I    D    I    S    T    U    F    F
  135. X    ~    ~    ~    ~    ~    ~    ~    ~    ~
  136. X
  137. X    Release 1.0 - - - MIDIstuff part I - - - Date: 16 Aug 1990
  138. X
  139. X        Ok, so this is my little MIDI tool package. It's the first
  140. X             release, it's my first Amiga release anyway. :-)
  141. X      Introducing: This package contains 4 little tools that use the
  142. X      MIDI.library so that they can use MIDI at the same time and can
  143. X                   easily be combined in a modular way.
  144. X
  145. XMIDIkeys    V1.0    "Virtual MIDI Keyboard"
  146. X~~~~~~~~
  147. X Simulates a MIDI keyboard by painting a 10-octave (!) (full MIDI note range)
  148. X into a window, all incoming MIDI notes (kinda OMNI ON) are displayed by
  149. X highlighting the keys, the colours change depending on the velocity, when
  150. X the window is activated a piano keyboard is simulated on the Amiga keyboard
  151. X which is converted into outgoing MIDI events. Input and output streams are
  152. X by default sent to the MIDI interface.
  153. X
  154. X    SYNOPSYS: [run] MIDIkeys [-i <Input>] [-o <Output>] [-t] [<Name>]
  155. X    ~~~~~~~~
  156. X With the <i> and <o> options MIDI input & output streams can be redirected,
  157. X if a stream doesn't exist then the keyboard simply won't have it, e.g.
  158. X "MIDIkeys -i none" will cause MIDIkeys to not have any input to show.
  159. X The <t> enables an additional "thru" route between the input and output.
  160. X The <Name> is by default "Keyboard", it is the name used in the public MIDI
  161. X routing lists, you can use an other if you use more than one keyboard, the
  162. X new name will appear in the titlebar of the window.
  163. X
  164. X For other notifications the screen titlebar is used. MIDIkeys has a few
  165. X special keys: Right-Amiga-[`] toggles MIDI thru, also F10 does.
  166. X F2 and F1 respectively increment and decrement the channel the keyboard
  167. X sends on, which by default is 1.
  168. X And there also is a silly surprise key hidden somewhere...
  169. X
  170. XMIDIdump    V1.0    "Simple MIDI SysX Dumper"
  171. X~~~~~~~~
  172. X Receives & Sends MIDI "System Exclusive" data, (sysx, patch data for
  173. X synthesizers etc.). Data can be stored and retrieved from DOS.
  174. X
  175. X    SYNOPSYS: [run] MIDIdump
  176. X    ~~~~~~~~
  177. X This tool always connects directly to the MIDI ports. It allocates 50000
  178. X bytes of buffer space for sysx data at startup. It opens a text window
  179. X and displays the list of commands, it uses the ARP FileRequester for
  180. X data storage. The program is self-explicatory (I hope!).
  181. X
  182. XMIDIrec        V1.0    "Little MIDI Recorder"
  183. X~~~~~~~
  184. X Records or plays back note data from the musical instrument digital
  185. X interface (MIDI) using MIDI realtime information as timing clock.
  186. X Sequential music data can be stored and retrieved from DOS.
  187. X
  188. X    SYNOPSYS: [run] MIDIrec [-i <Input>] [-o <Output>] [-t] [<Name>]
  189. X    ~~~~~~~~
  190. X Arguments and options are identical to those of MIDIkeys, but, if a MIDI
  191. X socket doesn't exist the program complains.
  192. X
  193. X You'll be surprised when you run it, it has no "PLAY" or "STOP" keys,
  194. X in fact it expects START and STOP events to come from MIDI along with the
  195. X timing information, so the only key there needs to be is the "RECORD"
  196. X gadget which toggles recording and playback, when pressed it automatically
  197. X 'rewinds' so that recording or playback can be started immediately without
  198. X even stopping the clock, unless you have a drum machine or sequencer
  199. X attached, which would get out of sync. When activating the "RECORD" gadget
  200. X the buffer is automatically deleted, no "tape merging" can be done!
  201. X A MIDI-start-event rewinds the tape too, so the "REWIND" gadget isn't
  202. X usually needed. For notifications the screen titlebar is used.
  203. X Further functions can be obtains by picking menu items or pressing the
  204. X equivalent keys. The functions and keys are:
  205. X
  206. X    Load    (right-amiga-"l")    Choose a file to load.
  207. X    Save As    (right-amiga-"s")    Choose a filename to save music to.
  208. X    Re-Read    (right-amiga-"r")    Load that file again.
  209. X    Write    (right-amiga-"w")    Save it again.
  210. X    Help    (right-amiga-".")    Give info about "tape".
  211. X    Thru    (right-amiga-"`")    Toggle the thru function.
  212. X
  213. XMIDIclock    V1.0    "MIDI Clock Generator"
  214. X~~~~~~~~~
  215. X Should be a reliable source of MIDI realtime clock information, but it
  216. X isn't. I warn you, this program generates a lot of load, too. It is better
  217. X to avoid using it, rather have clock events come in from the real MIDI.
  218. X But if you have no other choice...
  219. X
  220. X    SYNOPSYS: [run] MIDIclock [-o <Output>] [<Name>]
  221. X    ~~~~~~~~
  222. X Redirect the output as usual, use <Name> if you want more then one
  223. X (bleargh!) MIDI clock in your system! (to generate MIDI coughs etc..)
  224. X
  225. X The MIDIclock is called by the timer.device 96 times per quarter note, it
  226. X then outputs a clock event to its MIDI port, which can be redirected
  227. X into the recorder or anywhere else. It has 3 buttons, START, STOP and
  228. X CONTINUE, which do what they're supposed to, a proportional gadget
  229. X changes the speed, which by default is set to 120 b/m.
  230. X
  231. X     BUGS:    Amiga may halt when too much overhead is generated.
  232. X     ~~~~
  233. X This happens all too easy, for example when doing lots of multi-tasking
  234. X like running a mouse accelerator or other load. It also can happen when
  235. X you use the speed gadget while the clock is running, so always stop it
  236. X when changing output speed, better not change it at all, it does strange
  237. X things sometimes! The MIDIclock has a little overhead detecting routine,
  238. X it will toggle the power-LED when overhead is detected. If the flashing
  239. X rapidly increases you better click the MIDIclock away and start a new one.
  240. X
  241. XList of files the binaries package should include:
  242. X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  243. XREADME
  244. XMIDIclock        The executables
  245. XMIDIdump
  246. XMIDIkeys
  247. XMIDIrec
  248. XEXEC.ME            A script to run a typical configuration
  249. X
  250. XLibs            The libraries used by the executables
  251. XLibs/ARP.Library    I'm not sure if they are the latest releases.
  252. XLibs/MIDI.Library    Put them in libs: if you don't have them.
  253. X
  254. XSeQuences        Data files that can be played by MIDIrec.
  255. XSeQuences/Bass & Tubes         [Lynx'86]    One channel, non-dynamic.
  256. XSeQuences/Castagna Groove      [Lynx'89]    Dynamic, multi-channel.
  257. XSeQuences/Hand Play            [scratch]    Dynamic, one channel.
  258. XSeQuences/Once Had A Dream     [Lynx'89]    Dynamic, multi-channel.
  259. XSeQuences/Pray Talk            [Lynx'87]    Non-dynamic.
  260. X
  261. XSysX            Data files for the MIDIdump
  262. XSysX/CasioRequest.x    A sysx data dump request for Casio CZ synths.
  263. X
  264. XCOPYRIGHT NOTICE
  265. X The binaries package is placed into public domain, this also includes the
  266. X music files, use them whereever you want, with one exception:
  267. X "Pray Talk" may not be used without my prior permission.
  268. X The package is provided "as is". I don't guarantee the functionality of
  269. X any data provided with this package.
  270. X
  271. X Source-code and binaries have originally been posted as seperated
  272. X packages, yet the may also appear together (in one single zoo).
  273. X Follow-up MIDIstuff packages may contain more efficient versions of
  274. X these programs, but also new MIDI modules like a MIDI-to-Amiga-Audio
  275. X interface, enhanced recording software like a MIDI sequencer, a
  276. X screen-sharing interface for all modules, etc...
  277. X
  278. XCONCLUDING...
  279. X Hope this helps you MIDIaners out there, enjoy music, enjoy MIDIstuff! :-)
  280. X Btw, none of the executables can be made resident.
  281. X
  282. XMaterial encouragements to:
  283. X
  284. X    ~~~    Carl "Lynx" v. Loesch
  285. X    $ $      Georgenstr. 142
  286. X     v     D - 8 Muenchen 40
  287. X    \_/           ~~~~~~~~        "West" Germany...
  288. X
  289. XVirtual encouragements and suggestions to:
  290. X
  291. X    loesch @ informatik.tu-muenchen.de
  292. X        (valid till november'90 i hope)
  293. X    lynx @ suttner.informatik.uni-oldenburg.de
  294. X        (if the mailers manage to get through to this machine)
  295. X    gebhart @ informatik.tu-muenchen.de
  296. X        (if the above doesn't works; a dear friend of mine)
  297. END_OF_FILE
  298. if test 7437 -ne `wc -c <'README'`; then
  299.     echo shar: \"'README'\" unpacked with wrong size!
  300. fi
  301. chmod +x 'README'
  302. # end of 'README'
  303. fi
  304. if test ! -d 'lib' ; then
  305.     echo shar: Creating directory \"'lib'\"
  306.     mkdir 'lib'
  307. fi
  308. if test -f 'lib/ynx.lib.uu' -a "${1}" != "-c" ; then 
  309.   echo shar: Will not clobber existing file \"'lib/ynx.lib.uu'\"
  310. else
  311. echo shar: Extracting \"'lib/ynx.lib.uu'\" \(7665 characters\)
  312. sed "s/^X//" >'lib/ynx.lib.uu' <<'END_OF_FILE'
  313. Xbegin 700 ynx.lib
  314. XM86H````"7U-A>4YU;0`W`E]->4]P96Y7:6YD;W<`:`)?1V5T4V-R965N`)4"1
  315. XM7TUA:V5087)E;G0`P0)?0S)8`.P"7TYU;51O4W1R:6YG`#L#7T=E=%=I;F1OK
  316. XM=P"!`U]4:&EC:U1E>'0`X@-?0VAE8VM4=6D`*01?3&]A9$9R97%#;VP`*01?*
  317. XM3&]A9$%S`"D$7U-A=F5&<F5Q0V]L`"D$7U-A=F5!<P`I!%],;V%D`"D$7U-A6
  318. XM=F4`````````````````````````````````````````````````````````;
  319. XM`````````````````````````````````````````````````````````````
  320. XM`````````````````````````````````````````````````````````````
  321. XM`````````````````````````````````````````````````````````````
  322. XM`````````````````````````````````````````````````````````````
  323. XM`````````````````````````````````````````````````````````````
  324. XM`````````````````````````````````````````````````````````````
  325. XM`````````````````````````````````````````````````````````````
  326. XM`````````````````````````````````````````````````````````````
  327. XM`````````````````````````````````````````````````````````````
  328. XM`````````````````````````````````````````````````````````````
  329. XM`````````````````````````````````````````````````````````````
  330. XM`````````````````````````````````````````````````````````````
  331. XM`````````````````````````````````````````````````````````````
  332. XM`````````````````````````````````````````````````````````````
  333. XM`````````````````````````````````````````````````````````````
  334. XM`````````````````````````````````````````````````````````````
  335. XM`````````````````````````````````````````````````````````````
  336. XM`````````````````````````````````````````````````````````````
  337. XM`````````````````````````````````````````````````````````````
  338. XM`````````````````````````````````````````````````````````````
  339. XM`````````````````````````````````````````````````````````````
  340. XM`````````````````````````````````````````````````````````````
  341. XM`````````````````````````````````````````````````````````````
  342. XM`````````````````````````````````````````````````````````````
  343. XM`````````````````````````````````````````````````````````````
  344. XM`````````````````````````````````````````````````````````````
  345. XM`````````````````````````````````````````````````````````````
  346. XM`````````````````````````````````````````````````````````````
  347. XM`````````````````````````````````````````````````````````````
  348. XM`````````````````````````````````````````````````````````````
  349. XM`````````````````````````````````````````````````````````````
  350. XM`````````````````````````````````````````````````````````````
  351. XM`````````````````````````````````````````````````````````````
  352. XM`````````````````````````````````````````````````````````````
  353. XM`````````````````````````````````````````````````````````````
  354. XM`````````````````````````````````````````````````````````````
  355. XM`````````````````````````````````````````````````````````````
  356. XM`````````````````````````````````````````````````````````````
  357. XM`````````````````````````````````````````````````````````````
  358. XM`````````````````````````````````````````````````````````````
  359. XM``````````````````````````````!!2E-A>4YU;0``````7```````````$
  360. XM``8````<``D`'``WP``""```7U-A>4YU;0`'"```7TYU;51O4W1R:6YG``<(K
  361. XM``!?36]V90`'"```7U-E=$%096X`!P@``%]497AT``<(```N8F5G:6X`````)
  362. XM'TY5_^Y"IT*G2&W_[R\M``P13KKZ<0`?3^\`$!M`_^XO+0`4+RT`$!4O+0`(:
  363. XM3KKZ<@`=3^\`#"\M`!@O+0`(3KKZ<P`?4$\0+?_N2(!(P"\`2&W_[Q4O+0`(K
  364. XM3KKZ=``73^\`#$Y=3G7U````04I->4]P96Y7:0```$0````````````%``$`G
  365. XM'``)`!L`,<```@@``%]->4]P96Y7:6YD;W<`!P@``%]/<&5N5VEN9&]W``<(Q
  366. XM``!?0VEA;P`'"@``7W9I9&5O<VEG``<(```N8F5G:6X``````H``.AM.50``A
  367. XM+PHO+0`(3KKZ<0`96$\D0$J`9@I(>OHA8``P$4ZZ^G(`'UA/(&H`5G``$"@`N
  368. XM#W(!X:$1@ZW0`G,`'R`*)%].74YU3F\@=VEN9&\1=P#U`$%*1V5T4V-R964`<
  369. XM``!:`````````````P```!0`"0`4`"W```((``!?1V5T4V-R965N``<(``!?2
  370. XM3W!E;E-C<F5E;@`'"```+F)E9VEN````'TY5_^!";?_@.VT`%O_B.VT?`!K_B
  371. XMY#MM`![_YCMM`!+_Z!\;;0`C_^H;;0`G_^L[;0`J'__L.VT`"O_N0JW_\"MMM
  372. XM``P?__1"K?_X*VT`+/_\2&W_X!%.NOIQ`!583TY=3G7U`$%*36%K95!A<F4`+
  373. XM``!:`````````````P```!,`"0`3`"S```((``!?36%K95!A<F5N=``'"```8
  374. XM7W-T<FQE;@`'"```+F)E9VEN```93E7__"\M``A.NOIQ`!]83]"M``A3@"M`0
  375. XM__P@;?_\'['M``AG&B!M__P,$``O9Q`?(&W__`P0`#IG!E.M__Q@W!\@;?_\;
  376. XM#!``.F<((&W__$(0'6`((&W__$(H``%.74YU]0``04I#,E@``````````#P`.
  377. XM```4```````"``(`$``)``X`*\```@@``%]#,E@`!P@``"YB96=I;@`#@```E
  378. XM`X``$1-.50``]1\P,3(S-#4V-S@Y86)C9&5F$`#T]1)?7P#T'7``$"T`"\"\.
  379. XM````#T'Z^F``$QMP"`#0A"%A`#$?<``0+0`+P+P```#PZ(A!^OI@`!,;<`@`_
  380. XMT(1A`!%!^OIA`!4@"$Y=3G7U`````$%*3G5M5&]3='(```#4````````````'
  381. XM!````!4`"0`5`$_```((``!?3G5M5&]3=')I;F<`!P@``"YM;V1U``<(```N(
  382. XM9&EV=0`'"```+F)E9VEN`!].5?_V2.<,`'@`>@!*K0`4'V8(*WP````P`!1*K
  383. XMK0`(9S`7<@H@+0`(3KKZ<0`?T+P````P$@52!70`%`%![1W_]A&`*`!R"B`M[
  384. XM``A.NOIR`!\K0``(8,IP`!`%(BT`$+*`'V,H<``0!'(`$@4D+0`0E($?L()DP
  385. XM%!`$4@1R`!(`(&T`#!\1K0`7&`!@VF`62JT`$&<0'W``$`4B+0`0LH!D!%,%*
  386. XM8/`?2@5C'E,%<``0!4'M__82!!]2!'0`%`$B;0`,$[`(`"@`'V#><``0!"!M/
  387. XM``Q",`@`<``9$`1,WP`P3EU.=?4```!!2D=E=%=I;F1O````E```````````A
  388. XM``4``0`;``D`&@!&P``""```7T=E=%=I;F1O=P`'"```7T]P96Y7:6YD;W<`#
  389. XM!P@``%]#:6%O``<*``!?=FED96]S:6<`!P@``"YB96=I;@````*``(H?3E7_#
  390. XMT"\*.VT`#O_0.VT`$A__TCMM`!;_U#MM`!K_UAMM'P`?_]@;;0`C_]DK;0`D\
  391. XM_]H?("T`*("\````"BM`_]Y"K1__XBMM``C_ZD*M_^Y"K?_R&SM\``'__DAMT
  392. XM_]!.NOIQ`!E83R1`2H!F"DAZ^B%@`#`13KKZ<@`?6$\@:@!6<``0*``/<@'A#
  393. XMH1&#K=`"<P`?(`HD7TY=3G5.;R!W:6YD;Q%W`/4`````04I4:&EC:U1E>```+
  394. XM`-8````````````(````)``)`"0`8<```@@``%]4:&EC:U1E>'0`!P@``%]!`
  395. XM<VM3;V9T4W1Y;&4`!P@``%]39713;V9T4W1Y;&4`!P@``%]S=')L96X`!P@`G
  396. XM`%]3971!4&5N``<(``!?36]V90`'"```7U1E>'0`!P@``"YB96=I;@``'4Y5)
  397. XM``!(YPP`+RT`"$ZZ^G$`'UA/*``O!$AX``0O+0`(3KKZ<@`;3^\`#"@`+RT`X
  398. XM%$ZZ^G,`'UA/&@`0+0`;2(!(P"\`+RT3``A.NOIT`!]03R`M`!!2@"\`("T`6
  399. XM#%*`%R\`+RT`"$ZZ^G4`'T_O``P0!4B`2,`O`"\M`!05+RT`"$ZZ^G8`'T_OZ
  400. XM``P0+0`?2(!(P"\`+RT3``A.NOIT`!]03R\M`!`O+0`,+RT`"$ZZ^G4`'T_O>
  401. XM``P0!4B`2,`O`"\M`!05+RT`"$ZZ^G8`'4_O``PO!$*G+RT`"$ZZ^G(`'4_OW
  402. XM``PH`$S?`#!.74YU]0```$%*0VAE8VM4=6D```"`````````````"````"(`W
  403. XM"0`B`$?```((``!?0VAE8VM4=6D`!PH``%]W:6X`!P@``%]'971-<V<`!P@`M
  404. XM`%]297!L>4US9P`'"```7TAA;F1L945V96YT``<(``!?2&ET84ME>0`'"```Z
  405. XM7T-I86\`!P@``"YB96=I;@`93E4``$CG#B`@;=`"<0`5+R@`5DZZ^G(`'UA/"
  406. XM)$!*@&=<*"H`%#PJ`!@7*BH`'"\*3KKZ<P`96$\@!&`B+P5.NOIT`!M83V`XT
  407. XM<``P!B\`3KKZ=0`76$]@*D*G3KKZ=@`?6$]@()"\````0&?6D+P``!\`P&?.D
  408. XMD+P```$`9]Z0O```'0(`9\A@D$S?!'!.74YU]0``04I&:6QE<P```````IP`Z
  409. XM```````````:``(`6@`)`%@!*<```@@``%],;V%D1G)E<4-O;``""``27TQO,
  410. XM861!<P`'"@``7V9R97$`!PH``%]L;V%D;F%M90`'"```7T9I;&5297%U97-T?
  411. XM``<*``!?9&ER``<*``!?9FEL90`'"```7W-T<F-P>0`'"```7U1A8VM/;@`''
  412. XM"```7TQO861)=``""`!P7U-A=F5&<F5Q0V]L``((`()?4V%V94%S``<*``!?6
  413. XM<V%V96YA;64`!P@``%]3879E270``@@`X%],;V%D``<*``!?<F5T``<(``!?\
  414. XM4U!R:6YT9@`'"```7U-A>0`'"```7T]P96X`!P@``%]296%D``<(``!?0VQO7
  415. XM<V4``@@!L%]3879E``<(``!?1&5L971E1FEL90`'"```7T%R<$QO8VL`!P@`K
  416. XM`%]7<FET90`'"```+F)E9VEN``````*``7@"@`)F'TY5```@;0`,$7P``@`)$
  417. XM3ET73G5.50``(&W0`G(`%T/Z`$X@B4'Z^G,`$2)MT`)R`!DC2``$0?K_TB)MS
  418. XMT`)R`!4C2``2+RW0`G(`$4ZZ^G0`%UA/2H!G($AZ^G4`$4AZ^G8`$4ZZ^G<`*
  419. XM$U!/2'KZ<P`12'KZ=@`13KKZ>``34$].NOIY`!E.74YU3&]A9```'TY5```@%
  420. XM;0`,$7P``P`)3ET73G5.50``(&W0`G(`%T/Z`$X@B4'Z^GP`$2)MT`)R`!DCG
  421. XM2``$0?K_TB)MT`)R`!4C2``2+RW0`G(`$4ZZ^G0`%UA/2H!G($AZ^G4`$4AZW
  422. XM^G8`$4ZZ^G<`$U!/2'KZ?``12'KZ=@`13KKZ>``34$].NOI]`!E.74YU4V%V4
  423. XM90``'4Y5``!(YP@@+RT`"$AZ^B%@`#`12'KZ?P`13KKZ<`$53^\`#$AZ^G\`W
  424. XM$4ZZ^G$!&UA/2'@#[2\M``A.NOIR`1]03R1`2H!G%"\M`!`O+0`,$R\*3KKZ9
  425. XM<P$=3^\`#"@`(`IG""\*3KKZ=`$?6$]*A&<D(`12@&<>+P1(>OHA8``^$4AZG
  426. XM^G\`$4ZZ^G`!%4_O``Q(>OI_`!%.NOIQ`1583V`,2'KZ(6``4((13KKZ<0$?W
  427. XM6$]X`"`$3-\$$$Y=3G5,;Q]A9&EN9R`G)7,G+@`E;&0@'V)Y=&5S(&QO861E!
  428. XM9"X`*D\?;W!S*BP@8V]U;&1N)W0@;!5O860N```?3E4``$CG""!X`)7*+RT`A
  429. XM"!%(>OHA80`P$4AZ^G\`$4ZZ^G`!%4_O``Q(>OI_`!%.NOIQ`1=83R\M``A.F
  430. XMNOIV`1M83TAX__\O+0`(3KKZ=P$?4$]*@&8H2'@#[B\M``A.NOIR`1]03R1`+
  431. XM2H!G%"\M`!`O+0`,$R\*3KKZ>`$=3^\`#"@`(`IG""\*3KKZ=`$?6$]*A&<F9
  432. XM(`12@&<@+RT`$!%(>OHA80`]$4AZ^G\`$4ZZ^G`!%4_O``Q(>OI_`!%.NOIQC
  433. XM`1583V`*2'KZ(6$`7X$13KKZ<0$?6$],WP003EU.=5-A=FEN9Q\@)R5S)RX`X
  434. XM)6QD(&)Y=&5S'R!S=&]R960N`"I!<F=H*BP?(&-O=6QD;B=T('-A=F4N`/4`-
  435. X#`````
  436. X``
  437. Xend
  438. Xsize 5448
  439. END_OF_FILE
  440. if test 7665 -ne `wc -c <'lib/ynx.lib.uu'`; then
  441.     echo shar: \"'lib/ynx.lib.uu'\" unpacked with wrong size!
  442. fi
  443. # end of 'lib/ynx.lib.uu'
  444. fi
  445. if test ! -d 'src' ; then
  446.     echo shar: Creating directory \"'src'\"
  447.     mkdir 'src'
  448. fi
  449. if test -f 'src/ClockPOW.c' -a "${1}" != "-c" ; then 
  450.   echo shar: Will not clobber existing file \"'src/ClockPOW.c'\"
  451. else
  452. echo shar: Extracting \"'src/ClockPOW.c'\" \(2138 characters\)
  453. sed "s/^X//" >'src/ClockPOW.c' <<'END_OF_FILE'
  454. X
  455. Xstruct PropInfo Gadget4SInfo = {
  456. X    AUTOKNOB+FREEHORIZ,
  457. X    -31007,-1,
  458. X    327,-1,
  459. X};
  460. X
  461. Xstruct Image Image1 = {
  462. X    49,0,
  463. X    6,12,
  464. X    0,
  465. X    NULL,
  466. X    0x0000,0x0000,
  467. X    NULL
  468. X};
  469. X
  470. Xstruct IntuiText IText1 = {
  471. X    3,0,JAM2,
  472. X    7,4,
  473. X    NULL,
  474. X    (UBYTE *)"Speed",
  475. X    NULL
  476. X};
  477. X
  478. Xstruct Gadget Gadget4 = {
  479. X    NULL,
  480. X    187,12,
  481. X    107,16,
  482. X    GADGHBOX+GADGHIMAGE,
  483. X    RELVERIFY,
  484. X    PROPGADGET,
  485. X    (APTR)&Image1,
  486. X    NULL,
  487. X    &IText1,
  488. X    NULL,
  489. X    (APTR)&Gadget4SInfo,
  490. X    NULL,
  491. X    NULL
  492. X};
  493. X
  494. XSHORT BorderVectors1[] = {
  495. X    0,0,
  496. X    53,0,
  497. X    53,17,
  498. X    0,17,
  499. X    0,0
  500. X};
  501. Xstruct Border Border1 = {
  502. X    -2,-1,
  503. X    3,0,JAM1,
  504. X    5,
  505. X    BorderVectors1,
  506. X    NULL
  507. X};
  508. X
  509. Xstruct IntuiText IText4 = {
  510. X    2,0,JAM2,
  511. X    108,4,
  512. X    NULL,
  513. X    (UBYTE *)"Continue",
  514. X    NULL
  515. X};
  516. X
  517. Xstruct IntuiText IText3 = {
  518. X    2,0,JAM2,
  519. X    60,4,
  520. X    NULL,
  521. X    (UBYTE *)"Stop",
  522. X    &IText4
  523. X};
  524. X
  525. Xstruct IntuiText IText2 = {
  526. X    2,0,JAM2,
  527. X    4,4,
  528. X    NULL,
  529. X    (UBYTE *)"Start",
  530. X    &IText3
  531. X};
  532. X
  533. Xstruct Gadget g_Start = {
  534. X    &Gadget4,
  535. X    6,12,
  536. X    50,16,
  537. X    NULL,
  538. X    RELVERIFY,
  539. X    BOOLGADGET,
  540. X    (APTR)&Border1,
  541. X    NULL,
  542. X    &IText2,
  543. X    NULL,
  544. X    NULL,
  545. X    NULL,
  546. X    NULL
  547. X};
  548. X
  549. XSHORT BorderVectors2[] = {
  550. X    0,0,
  551. X    77,0,
  552. X    77,17,
  553. X    0,17,
  554. X    0,0
  555. X};
  556. Xstruct Border Border2 = {
  557. X    -2,-1,
  558. X    3,0,JAM1,
  559. X    5,
  560. X    BorderVectors2,
  561. X    NULL
  562. X};
  563. X
  564. Xstruct Gadget g_Continue = {
  565. X    &g_Start,
  566. X    109,12,
  567. X    74,16,
  568. X    NULL,
  569. X    RELVERIFY,
  570. X    BOOLGADGET,
  571. X    (APTR)&Border2,
  572. X    NULL,
  573. X    NULL,
  574. X    NULL,
  575. X    NULL,
  576. X    NULL,
  577. X    NULL
  578. X};
  579. X
  580. XSHORT BorderVectors3[] = {
  581. X    0,0,
  582. X    44,0,
  583. X    44,17,
  584. X    0,17,
  585. X    0,0
  586. X};
  587. Xstruct Border Border3 = {
  588. X    -2,-1,
  589. X    3,0,JAM1,
  590. X    5,
  591. X    BorderVectors3,
  592. X    NULL
  593. X};
  594. X
  595. Xstruct Gadget g_Stop = {
  596. X    &g_Continue,
  597. X    62,12,
  598. X    41,16,
  599. X    NULL,
  600. X    RELVERIFY,
  601. X    BOOLGADGET,
  602. X    (APTR)&Border3,
  603. X    NULL,
  604. X    NULL,
  605. X    NULL,
  606. X    NULL,
  607. X    NULL,
  608. X    NULL
  609. X};
  610. X
  611. X#define GadgetList1 g_Stop
  612. X
  613. Xstruct NewWindow NewWindowStructure1 = {
  614. X    189,50,
  615. X    300,31,
  616. X    0,2,
  617. X    GADGETUP+CLOSEWINDOW,
  618. X    WINDOWDRAG+WINDOWCLOSE,
  619. X    &g_Stop,
  620. X    NULL,
  621. X    (UBYTE *)" MIDI Clock Generator ",
  622. X    NULL,
  623. X    NULL,
  624. X    5,5,
  625. X    640,200,
  626. X    WBENCHSCREEN
  627. X};
  628. X
  629. X
  630. Xvoid HandleEvent(object)
  631. XAPTR object;
  632. X{
  633. X  if (object == (APTR)&g_Stop) { Stop(object); return; }
  634. X  if (object == (APTR)&g_Continue) { Continue(object); return; }
  635. X  if (object == (APTR)&g_Start) { Start(object); return; }
  636. X  if (object == (APTR)&Gadget4) { NewSpeed(object); return; }
  637. X}
  638. X#define HANDLEEVENT HandleEvent
  639. X
  640. X/* end of PowerWindows source generation */
  641. END_OF_FILE
  642. if test 2138 -ne `wc -c <'src/ClockPOW.c'`; then
  643.     echo shar: \"'src/ClockPOW.c'\" unpacked with wrong size!
  644. fi
  645. chmod +x 'src/ClockPOW.c'
  646. # end of 'src/ClockPOW.c'
  647. fi
  648. if test -f 'src/MAKEFILE' -a "${1}" != "-c" ; then 
  649.   echo shar: Will not clobber existing file \"'src/MAKEFILE'\"
  650. else
  651. echo shar: Extracting \"'src/MAKEFILE'\" \(591 characters\)
  652. sed "s/^X//" >'src/MAKEFILE' <<'END_OF_FILE'
  653. XCFLAGS    = +l -s
  654. XINCDIR    = inc:
  655. XINTUI    = syms:intuition
  656. XLIBS    = -lynx -lmidi -la -lc32
  657. X
  658. X.c.oi:
  659. X    cc $(CFLAGS) +I$(INTUI) -o $@ $*
  660. X
  661. XMIDIstuff:    $(INTUI) MIDIkeys MIDIrec MIDIdump MIDIclock
  662. X    run midirec
  663. X    run midiclock -o Recorder
  664. X    run midikeys -i Recorder -o Recorder
  665. X
  666. XMIDIkeys:    MIDIkeys.oi
  667. X    ln +q MIDIkeys.oi $(LIBS)
  668. X
  669. XMIDIrec:    MIDIrec.oi RecPOW.oi
  670. X    ln +q MIDIrec.oi RecPOW.oi $(LIBS)
  671. X
  672. XMIDIdump:    MIDIdump.oi
  673. X    ln +q MIDIdump.oi $(LIBS)
  674. X
  675. XMIDIclock:    MIDIclock.oi ClockPOW.oi
  676. X    ln +q MIDIclock.oi ClockPOW.oi $(LIBS)
  677. X
  678. X$(INTUI):
  679. X    cc +l -s +H$(INTUI) -o t:itmp $(INCDIR)intuition/intuition.h
  680. X    delete t:itmp
  681. END_OF_FILE
  682. if test 591 -ne `wc -c <'src/MAKEFILE'`; then
  683.     echo shar: \"'src/MAKEFILE'\" unpacked with wrong size!
  684. fi
  685. chmod +x 'src/MAKEFILE'
  686. # end of 'src/MAKEFILE'
  687. fi
  688. if test -f 'src/MIDIclock.c' -a "${1}" != "-c" ; then 
  689.   echo shar: Will not clobber existing file \"'src/MIDIclock.c'\"
  690. else
  691. echo shar: Extracting \"'src/MIDIclock.c'\" \(4453 characters\)
  692. sed "s/^X//" >'src/MIDIclock.c' <<'END_OF_FILE'
  693. X/*            C    L    O    C    K
  694. X#define    VBLANK
  695. X*/
  696. X#define    OVERHEAD_HANDLE
  697. X#define    NO_ACCURACY
  698. X#define    CLOCKPRIO    19L
  699. X
  700. Xextern    struct    Gadget        Gadget4SInfo;
  701. Xextern    struct    NewWindow    NewWindowStructure1;
  702. Xextern    struct    IntuiText    IText1;
  703. X
  704. X#ifdef    VBLANK
  705. X# define UNIT    UNIT_VBLANK
  706. X#else
  707. X# define UNIT    UNIT_MICROHZ
  708. X#endif
  709. X
  710. X#include "LYNX.H"
  711. X#include <hardware/cia.h>
  712. X
  713. X#include <MIDI/MIDI.h>
  714. XEXPORT    struct    MidiBase    *MidiBase;
  715. XEXPORT    struct    MSource        *source=0;
  716. XEXPORT    struct    MRoute        *sroute=0;
  717. Xchar    prgname[] =    "Clock",    *name = prgname;
  718. Xchar    midiout[] =    "MidiOut",    *output= midiout;
  719. Xchar    banner[] =
  720. X "*| MIDI Clock Generator V0.3 by Carlo \"Lynx\" von Loesch '90 |*";
  721. Xunion    Event clockevent;
  722. X
  723. X#include <libraries/ARPbase.h>
  724. XEXPORT    struct    ArpBase        *ArpBase;
  725. XEXPORT    struct    IntuitionBase    *IntuitionBase;
  726. XEXPORT    struct    GfxBase        *GfxBase;
  727. XEXPORT    struct    Window        *win;
  728. XEXPORT    struct    RastPort    *rp;
  729. X
  730. X#include <devices/timer.h>
  731. Xlong    timersig;
  732. Xstruct    MsgPort        *timpo;
  733. Xstruct    timerequest    *tr;
  734. X#ifdef ACCURACY
  735. Xlong    TimerBase;
  736. Xstruct    timeval    t1=NULL, t2=NULL;
  737. Xstruct    timerequest    *tr2;
  738. XULONG    normic;
  739. X#endif
  740. X
  741. Xchar    nomem[]="Don't do that, Dave";
  742. XFLAG    on = NO, play = NO;
  743. XEXPORT    long    sigs, videosig;
  744. X
  745. Xmain(argc, argv) long argc; char *argv[]; {
  746. X    register struct timerequest *time;
  747. X    register ULONG t;
  748. X
  749. X    ifnot (ArpBase = OpenLibrary("arp.library",ArpVersion))
  750. X        Ciao("No ARP.Library");
  751. X    IntuitionBase =    ArpBase -> IntuiBase;
  752. X    GfxBase =    ArpBase -> GfxBase;
  753. X    ifnot (MidiBase = ArpOpenLibrary (MIDINAME,MIDIVERSION))
  754. X        Ciao ("No MIDI.Library");
  755. X
  756. X    for (t=1; t<argc; t++) {
  757. X        if (argv[t][0]=='-') switch (argv[t][1]) {
  758. X            case 'o':    output = argv[++t]; break;
  759. X            default:    Ciao("Bad args");
  760. X        }
  761. X        else name = argv[t];
  762. X    }
  763. X    win = MyOpenWindow(&NewWindowStructure1);
  764. X    SetWindowTitles (win, -1L, banner);
  765. X    rp = win -> RPort;
  766. X    if (!(source = CreateMSource (name, NULL))) Ciao (nomem);
  767. X    if (!(sroute = MRouteSource (source, output, NULL)))
  768. X        Ciao ("no route out");
  769. X    if (! (timpo = CreatePort (0L, 0L)))    Ciao (nomem);
  770. X    if (! (tr = CreateExtIO (timpo, sizeof(struct timerequest)) ))
  771. X        Ciao (nomem);
  772. X    if (OpenDevice (TIMERNAME, UNIT, tr, 0)) Ciao ("No Timer");
  773. X    timersig = 1L<<timpo->SIGH; time = tr;
  774. X    sigs = timersig | videosig;
  775. X    clockevent.p[0] = (char) MS_CLOCK;
  776. X
  777. X#ifdef ACCURACY
  778. X    TimerBase = (long) time->tr_node.io_Device;
  779. X    if (! (tr2 = CreateExtIO (timpo, sizeof(struct timerequest)) ))
  780. X        Ciao (nomem);
  781. X    if (OpenDevice (TIMERNAME, UNIT_MICROHZ, tr2,0)) Ciao ("No Timer");
  782. X    tr2 ->tr_node.io_Command = TR_GETSYSTIME;
  783. X    normic =
  784. X#endif
  785. X    time->tr_time.tv_micro   = Speed2Mic(120);
  786. X    time->tr_node.io_Command = TR_ADDREQUEST;
  787. X    time->tr_time.tv_secs    = 0;
  788. X#ifdef CLOCKPRIO
  789. X    SetTaskPri(FindTask(NULL), CLOCKPRIO);
  790. X#endif
  791. X    forever if (play) {
  792. X#ifdef ACCURACY
  793. X        DoIO (time); GetTime (&t1);
  794. X#else
  795. X        SendIO (time);
  796. X#endif
  797. X        PutMidiMsg (source, &clockevent);
  798. X#ifdef ACCURACY
  799. X        GetTime (&t2);
  800. X        SubTime (&t2, &t1);
  801. X        if ((time->tr_time.tv_micro = normic - t2.tv_micro) < 0)
  802. X            TOG_LED;
  803. X#else
  804. X# ifdef OVERHEAD_HANDLE
  805. X        if (CheckIO(time)) {
  806. X            AbortIO(time); TOG_LED; DoIO(time);
  807. X        } else
  808. X# endif
  809. X        if (timersig != Wait(sigs)) CheckTui();
  810. X#endif
  811. X        } else if (timersig != Wait(sigs)) CheckTui();
  812. X}
  813. X
  814. XNewSpeed () {
  815. X    register long a;
  816. X    static char s[3];
  817. X
  818. X    a = 1 + (Gadget4SInfo.HorizPot / Gadget4SInfo.HorizBody);
  819. X    NumToString (a, s, 3, ' ');
  820. X    IText1.IText = s;
  821. X    RefreshGadgets (win->FirstGadget, win, NULL);
  822. X    tr->tr_time.tv_micro = Speed2Mic (a);
  823. X}
  824. XStop() {
  825. X    SendMIDI (MS_STOP); play = NO;
  826. X}
  827. XStart() {
  828. X    if (!play) {
  829. X        SendMIDI (MS_START); play = YES;
  830. X    }
  831. X}
  832. XContinue() {
  833. X    if (!play) {
  834. X        SendMIDI (MS_CONTINUE); play = YES;
  835. X    }
  836. X}
  837. XHitaKey() {}
  838. X
  839. XSendMIDI (command) ULONG command; {
  840. X    static union Event otherevent;
  841. X
  842. X    otherevent.p[0] = (UBYTE) command;
  843. X    PutMidiMsg (source, &otherevent);
  844. X}
  845. X
  846. X#ifdef    ACCURACY
  847. XGetTime    (ti)
  848. Xstruct timeval *ti; {
  849. X    DoIO (tr2);
  850. X    ti->tv_secs = tr2->tr_time.tv_secs;
  851. X    ti->tv_micro= tr2->tr_time.tv_micro;
  852. X}
  853. X#endif
  854. X
  855. XCiao (str) char *str; {
  856. X    if (str) {
  857. X        INFO (str);
  858. X        if (win) SetWindowTitles (win, str, str);
  859. X        Delay (44L);
  860. X    }
  861. X    if (win)    CloseWindowSafely (win);
  862. X    if (sroute)    DeleteMRoute    (sroute);
  863. X    if (source)    DeleteMSource    (source);
  864. X#ifdef ACCURACY
  865. X    if (tr2) {
  866. X        CloseDevice (tr);
  867. X        DeleteExtIO (tr, sizeof(struct timerequest));
  868. X    }
  869. X#endif
  870. X    if (tr)    {
  871. X        AbortIO (tr); CloseDevice (tr);
  872. X        DeleteExtIO (tr, sizeof(struct timerequest));
  873. X    }
  874. X    if (timpo)    DeletePort (timpo);
  875. X    if (ArpBase)    CloseLibrary    (ArpBase);
  876. X    OFF_LED;
  877. X    exit(str ? 4404L : 0L);
  878. X}
  879. X
  880. Xlong Speed2Mic (speed) ULONG speed; {
  881. X    return (156250000/speed);
  882. X}
  883. END_OF_FILE
  884. if test 4453 -ne `wc -c <'src/MIDIclock.c'`; then
  885.     echo shar: \"'src/MIDIclock.c'\" unpacked with wrong size!
  886. fi
  887. chmod +x 'src/MIDIclock.c'
  888. # end of 'src/MIDIclock.c'
  889. fi
  890. if test -f 'src/MIDIclock.uu' -a "${1}" != "-c" ; then 
  891.   echo shar: Will not clobber existing file \"'src/MIDIclock.uu'\"
  892. else
  893. echo shar: Extracting \"'src/MIDIclock.uu'\" \(1422 characters\)
  894. sed "s/^X//" >'src/MIDIclock.uu' <<'END_OF_FILE'
  895. Xbegin 700 MIDIclock.POW
  896. XM4&]W97)7:6YD;W=S('8R+C`@J3$Y.#<@8GD@24Y/5D%44D].24-3+"!)3D,N.
  897. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@```#O@````D@``#^````H
  898. XM`0`````!``````M#;&]C:U!/5RYC```````````!````"@```D``!0`%`H``9
  899. XMR`````````````0`Q*\````````!```"`+T`,@$L`!\`!0`%_____P```!<@Z
  900. XM34E$22!#;&]C:R!'96YE<F%T;W(@```!O!@`/@`,`"D`$`````,``0`!N\0`R
  901. XM`````````````````````````;OP__[__P,```4``;O4````````````+```K
  902. XM`"P`$0```!$```````````````H````!`,5GR`#%>;@`Q7G(`,6AX```L6``@
  903. XM`5<(````!V=?4W1O<``````%4W1O<``````!``````$``````0`````!```!#
  904. XMQ>@`;0`,`$H`$`````,``0`!O$0``````````````````````````;QP__[_N
  905. XM_P,```4``;Q4````````````30```$T`$0```!$```````````````H````!?
  906. XM``&\F``!O4```;RP``'%N``!Q<@``<78````"V=?0V]N=&EN=64`````"4-O[
  907. XM;G1I;G5E``````$``````0`````!``````$```+&Z``&``P`,@`0`````P`!?
  908. XM``'&%````````<9````````````````!QMC__O__`P``!0`!QB0`````````O
  909. XM```U````-0`1````$0```````````@`!```$``0```````'&8``!QG`````&[
  910. XM4W1A<G0``@`!```\``0```````'&D``!QJ`````%4W1O<``"``$``&P`!```M
  911. XM`````<;```````````E#;VYT:6YU90`````*`````0`!RM```<K@``'*\``!B
  912. XMRS```<M```'+F`````AG7U-T87)T``````93=&%R=``````!``````$`````=
  913. XM`0`````!````````NP`,`&L`$`````,``P`"R@```````,68P````````LG@>
  914. XM``4`Q:%P__[__P,```4``L<D````````````;@```&X`$0```!$``````#$`Z
  915. XM```&``P``````````````````````P`!```'``0``````,682``````````&,
  916. XM4W!E960``0.&X?__`4?__P````@``P`!`,2M.`#%E````580`,?B$`#%E!@`_
  917. XIQ^(@`````0`````)3F5W4W!E960``````0`````!``````$``````0#%W
  918. X``
  919. Xend
  920. Xsize 986
  921. END_OF_FILE
  922. if test 1422 -ne `wc -c <'src/MIDIclock.uu'`; then
  923.     echo shar: \"'src/MIDIclock.uu'\" unpacked with wrong size!
  924. fi
  925. # end of 'src/MIDIclock.uu'
  926. fi
  927. if test -f 'src/MIDIdump.c' -a "${1}" != "-c" ; then 
  928.   echo shar: Will not clobber existing file \"'src/MIDIdump.c'\"
  929. else
  930. echo shar: Extracting \"'src/MIDIdump.c'\" \(5131 characters\)
  931. sed "s/^X//" >'src/MIDIdump.c' <<'END_OF_FILE'
  932. X/*             MIDI-System-Exclusive Dumper
  933. X        Written, arranged, produced by Carl Ch. v. Loesch.
  934. X
  935. X        V1.0alpha    Saturday 19. 8. 89
  936. XChanges:    V1.0beta    Saturday  9. 6. 90
  937. X        V1.0gamma    Tuesday  25. 7. 90  now uses midi.library!
  938. X        V1.0        Wednesday 15.8. 90  now uses arp.lib too
  939. X*/
  940. X#include "Lynx.h"
  941. X#define    XBUFSIZE    50000L
  942. X
  943. X#include <libraries/ARPbase.h>
  944. XEXPORT    struct    ArpBase        *ArpBase;
  945. XEXPORT    struct    IntuitionBase    *IntuitionBase;
  946. XEXPORT    char    file[FCHARS+DSIZE+1]="", dir[DSIZE+1]="SysX",
  947. X        loadname[FCHARS+1]="out.x", savename[FCHARS+1]="in.x";
  948. XEXPORT    struct    FileRequester    *freq;
  949. XEXPORT    struct    Window        *win;
  950. X
  951. X#include <MIDI/MIDI.h>
  952. XEXPORT    struct    MidiBase    *MidiBase;
  953. XEXPORT    struct    MSource        *source=0;
  954. XEXPORT    struct    MDest        *dest=0;
  955. XEXPORT    struct    MRoute        *droute=0, *sroute=0;
  956. XEXPORT    struct    MidiPacket    *packet=0;
  957. Xstatic    struct    MRouteInfo routeinfo = { MMF_SYSEX };
  958. X     /* receive only sys/ex msg's */
  959. X
  960. Xstruct NewWindow nw = {
  961. X    10, 24, 620, 117,
  962. X    3, 2, CLOSEWINDOW+RAWKEY, WINDOWCLOSE+WINDOWDEPTH+WINDOWDRAG
  963. X    +SMART_REFRESH+WINDOWSIZING+NOCAREREFRESH,
  964. X    NULL, NULL, "*| MIDI SysX Dumper V1.0 by Carlo von Loesch '89/90 |*",
  965. X    NULL, NULL,
  966. X    300, 11, 640, 500,
  967. X    WBENCHSCREEN
  968. X};
  969. X
  970. XEXPORT    char    name[]="MIDIdump";
  971. XEXPORT    char    nomem[] = "Out of RAM";
  972. XEXPORT    UBYTE    *xbuffer, ret[77];
  973. XEXPORT    FLAG    timer = NO, cons = NO, logon = YES, spool = NO;
  974. XEXPORT    long    xlen = 0, sigs, videosig, midisig;
  975. Xstruct    IOStdReq conreq;
  976. X
  977. X_main    () {
  978. X    ifnot (ArpBase = OpenLibrary("arp.library",ArpVersion))
  979. X        Ciao("No ARP.Library");
  980. X    IntuitionBase =    ArpBase -> IntuiBase;
  981. X    ifnot (MidiBase = ArpOpenLibrary (MIDINAME,MIDIVERSION))
  982. X        Ciao ("No MIDI.Library");
  983. X
  984. X    conreq.io_Data = win = MyOpenWindow (&nw);
  985. X    OpenDevice("console.device", NULL, &conreq, NULL); cons=YES;
  986. X    ifnot (xbuffer = ArpAlloc (XBUFSIZE)) Ciao (nomem);
  987. X
  988. X    ifnot (freq = ArpAllocFreq()) Ciao (nomem); 
  989. X    freq->fr_Dir = dir; freq->fr_Window = win;
  990. X    freq -> fr_FuncFlags = FRF_NewWindFunc;
  991. X
  992. X    ifnot (source = CreateMSource (name, NULL))    Ciao (nomem);
  993. X    ifnot (sroute = MRouteSource (source, "MidiOut", NULL))
  994. X        Ciao ("No route out");
  995. X    ifnot (dest = CreateMDest (name, NULL))        Ciao (nomem);
  996. X    ifnot (droute = MRouteDest ("MidiIn", dest, &routeinfo))
  997. X        Ciao ("No route in");
  998. X    midisig = 1L<<dest->DestPort->SIGH;
  999. X    sigs = midisig | videosig;
  1000. X
  1001. X    HelpX ();
  1002. X    while (logon) {
  1003. X        if (midisig == Wait (sigs)) HandleMIDI();
  1004. X        else CheckTui ();
  1005. X    }
  1006. X    Ciao (NULL);
  1007. X}
  1008. X
  1009. XHandleMIDI () {
  1010. X    register long i;
  1011. X
  1012. X    if (packet = GetMidiPacket (dest)) {
  1013. X        xlen = packet->Length;
  1014. X        if (xlen < XBUFSIZE)
  1015. X            for (i=0; i<xlen; i++) xbuffer[i]=packet->MidiMsg[i];
  1016. X        else {
  1017. X            SPrintf (ret, "Buffer too small for %ld bytes.", xlen);
  1018. X            Say (ret);
  1019. X            xlen = 0;
  1020. X        }
  1021. X        FreeMidiPacket    (packet);
  1022. X        SPrintf (ret, "%ld bytes received.", xlen);
  1023. X        Say (ret);
  1024. X    }
  1025. X}
  1026. X
  1027. XHitaKey    (raw)
  1028. XULONG    raw; {
  1029. X    static    FLAG ctrl = NO;
  1030. X    register UBYTE z;
  1031. X
  1032. X    z = raw & 0x7f;
  1033. X    if (z == 99) { 
  1034. X        if (raw & 0x80) ctrl=NO;
  1035. X        else ctrl=YES;
  1036. X        return;
  1037. X    }
  1038. X    if (ctrl) switch (raw) {
  1039. X        case 16:/* Q */ logon = NO;
  1040. X    } else if (z == raw) {
  1041. X        switch (raw) {
  1042. X            case 20:/* T */ Transmit();    break;
  1043. X            case 51:/* C */ CheckX();    break;
  1044. X            case 40:/* L */ LoadAs();    break;
  1045. X            case 33:/* S */ SaveAs();    break;
  1046. X            case 69:/*ESC*/ logon = NO;
  1047. X            case 68:/*RET*/ HelpX ();
  1048. X        }
  1049. X        spool = NO;
  1050. X    }
  1051. X}
  1052. X
  1053. XLoadIt() {    xlen = Load (file, xbuffer,(long) XBUFSIZE);    }
  1054. XSaveIt() {    if (xlen) Save (file, xbuffer,(long) xlen);    }
  1055. XLogOut() {    logon = NO;    }
  1056. XHandleEvent() {}    /* no gadgets */
  1057. XTransmit () {
  1058. X    if (xlen) SendMIDI ("sysx buffer", xbuffer, xlen);
  1059. X    else Say ("*yawn*");
  1060. X}
  1061. X
  1062. Xlong SendMIDI (inf, buf, len)
  1063. X char    *inf;
  1064. X UBYTE    *buf;
  1065. X long    len;    {
  1066. X    register long r;
  1067. X
  1068. X    if (inf) {
  1069. X        SPrintf (ret, "Sending %s: %ld bytes.", inf, len);
  1070. X        Say (ret);
  1071. X    }
  1072. X    PutMidiMsg (source, xbuffer);
  1073. X    if (inf) Say ("sent.");
  1074. X}
  1075. X
  1076. X#define    ZOTARK    15
  1077. XCheckX () {
  1078. X    register UBYTE n;
  1079. X    register long i, j;
  1080. X    UBYTE    line[16];
  1081. X
  1082. X    if (xlen) {
  1083. X        spool = YES;
  1084. X        Say ("dump buffer:");
  1085. X        for (i=0; i<xlen; i++) {
  1086. X            n = xbuffer[i];
  1087. X            SPrintf (ret, " %s", C2X(n)); SayMore (ret);
  1088. X            j = i & ZOTARK;
  1089. X            if (n<32 || (n>127 && n<160)) n = '.';
  1090. X            line[j] = n;
  1091. X            if (j==ZOTARK) {
  1092. X                SPrintf (ret, " \xab %s \xbb",line);
  1093. X                Say (ret); CheckTui(); if (!spool) break;
  1094. X            }
  1095. X        }
  1096. X        Say (".");
  1097. X    }
  1098. X    else Say ("*yawn*");
  1099. X}
  1100. X
  1101. XHelpX () {
  1102. X    Say (" [L]oad into buffer.");
  1103. X    Say (" [T]ransmit to MIDI.");
  1104. X    Say (" [S]ave to disk.");
  1105. X    Say (" [C]heck buffer contents.");
  1106. X    Say ("\n [ESC]ape from here!");
  1107. X    Say (" [RET] type this info again.");
  1108. X    Say ("\nWhatever system-exclusive data arrives");
  1109. X    Say ("will be stored into buffer rightaway.");
  1110. X    SPrintf (ret, "\nBuffer currently contains %ld bytes.", xlen);
  1111. X    Say (ret);
  1112. X}
  1113. X
  1114. XSay (text) char *text; {
  1115. X    char tmp[78];
  1116. X    SPrintf (tmp, "%s\n", text); SayMore (tmp);
  1117. X}
  1118. XSayMore (text) char *text; {
  1119. X    conreq.io_Data = (APTR) text;
  1120. X    conreq.io_Length = -1;
  1121. X    conreq.io_Command = CMD_WRITE;
  1122. X    DoIO(&conreq);
  1123. X}
  1124. X
  1125. XCiao (str) char *str; {
  1126. X    if (cons) {
  1127. X        if (str) {
  1128. X            Say (str); Delay(21L);
  1129. X        }
  1130. X        CloseDevice (&conreq);
  1131. X    }
  1132. X    if (win)    CloseWindowSafely (win);
  1133. X    if (droute)    DeleteMRoute    (droute);
  1134. X    if (sroute)    DeleteMRoute    (sroute);
  1135. X    if (dest)    DeleteMDest    (dest);
  1136. X    if (source)    DeleteMSource    (source);
  1137. X    if (ArpBase)    CloseLibrary    (ArpBase);
  1138. X    exit (str ? 4404L : 0L);
  1139. X}
  1140. END_OF_FILE
  1141. if test 5131 -ne `wc -c <'src/MIDIdump.c'`; then
  1142.     echo shar: \"'src/MIDIdump.c'\" unpacked with wrong size!
  1143. fi
  1144. chmod +x 'src/MIDIdump.c'
  1145. # end of 'src/MIDIdump.c'
  1146. fi
  1147. if test -f 'src/MIDIkeys.c' -a "${1}" != "-c" ; then 
  1148.   echo shar: Will not clobber existing file \"'src/MIDIkeys.c'\"
  1149. else
  1150. echo shar: Extracting \"'src/MIDIkeys.c'\" \(6472 characters\)
  1151. sed "s/^X//" >'src/MIDIkeys.c' <<'END_OF_FILE'
  1152. X/*                  Virtual MIDI Keyboard
  1153. X        Written, arranged, produced by Carl Ch. v. Loesch.
  1154. X                (c)  1989, 1990.
  1155. X*/
  1156. X#include "Lynx.h"
  1157. X
  1158. X#include <libraries/ARPbase.h>
  1159. Xstruct    ArpBase        *ArpBase;
  1160. Xstruct    IntuitionBase    *IntuitionBase;
  1161. Xstruct    GfxBase        *GfxBase;
  1162. Xstruct    Window        *win;
  1163. Xstruct    RastPort    *rp;
  1164. X
  1165. X#include <MIDI/MIDI.h>
  1166. Xstruct    MidiBase    *MidiBase;
  1167. Xstruct    MSource        *source=0;
  1168. Xstruct    MDest        *dest=0;
  1169. Xstruct    MRoute        *droute=0, *sroute=0, *troute;
  1170. Xstruct    MRouteInfo    routeinfo = { MMF_NOTEOFF | MMF_NOTEON, 0xffff };
  1171. X
  1172. Xstatic UBYTE keytable[128] = {
  1173. X    0,61,63,0,66,68,70,0,73,75,0,78,80,82,0,0,    /*  0..15 */
  1174. X    62,64,65,67,69,71,72,74,76,77,79,81,0,0,0,0,    /* 16..31 */
  1175. X    42,44,46,0,49,51,0,54,56,58,0,0,0,0,0,0,    /* 32..47 */
  1176. X    41,43,45,47,48,50,52,53,55,57,59,0,0,0,0,0,    /* 48..63 */
  1177. X    0,0,60,0,83,0,0,0,0,0,0,0,0,0,0,0,        /* 64..79 (tab,cr) */
  1178. X    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,        /* 80..95 */
  1179. X    0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,        /* 96..111 (rsh) */
  1180. X    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,        /* 112..127 */
  1181. X    };
  1182. X
  1183. X#define    JOKES    6
  1184. Xstatic    char jokes[JOKES][70] = {
  1185. X"                    INCORRECT PASSWORD. TRY AGAIN.                    ",
  1186. X"           The password to go eat at the mensa is 'MAHLZEIT'          ",
  1187. X"          How many cans can a can can if a can can can cans?          ",
  1188. X" The Lynx says:    The best is yet to come... to come... to come...   ",
  1189. X"    The Lord of Sequence. The ultimate Amiga MIDI sequencer program.  ",
  1190. X"Greet'ns to SNEAK, NOAK, KIR, MADGUIT, KBR, YETI, ANT, WIZ, CRACKAKAN.",
  1191. X};
  1192. X
  1193. Xstruct NewWindow nw = {
  1194. X    0, 11, 640, 40,
  1195. X    1, 2, CLOSEWINDOW+RAWKEY,
  1196. X    WINDOWCLOSE+WINDOWDEPTH+WINDOWDRAG+SMART_REFRESH,
  1197. X    NULL, NULL, NULL, NULL, NULL,
  1198. X    0, 0, 0, 0,
  1199. X    WBENCHSCREEN
  1200. X};
  1201. X
  1202. Xchar    keyboard[] =    "Keyboard",    *name  = keyboard;
  1203. Xchar    midiin[] =    "MidiIn",    *input = midiin;
  1204. Xchar    midiout[] =    "MidiOut",    *output= midiout;
  1205. Xchar    nomem[] = "Gimme RAM!";
  1206. Xchar    banner[] =
  1207. X "*| Virtual MIDI Keyboard V1.0 by Carlo \"Lynx\" von Loesch (c)89 |*";
  1208. Xchar    header[] = "*| Virtual MIDI Keyboard ", *title = header;
  1209. XFLAG    logon = TRUE, thru = FALSE;
  1210. XEXPORT    long    videosig, sigs;
  1211. X
  1212. Xmain(argc, argv) long argc; char *argv[]; {
  1213. X    register struct    IntuiMessage    *tuimsg;
  1214. X    register union Event    *e;
  1215. X    register long    t;
  1216. X    register short    s;
  1217. X
  1218. X    ifnot (ArpBase = OpenLibrary("arp.library",ArpVersion))
  1219. X        Ciao("No ARP.Library");
  1220. X    IntuitionBase =    ArpBase -> IntuiBase;
  1221. X    GfxBase =    ArpBase -> GfxBase;
  1222. X    ifnot (MidiBase = ArpOpenLibrary (MIDINAME,MIDIVERSION))
  1223. X        Ciao ("No MIDI.Library");
  1224. X
  1225. X    for (t=1; t<argc; t++) {
  1226. X        if (argv[t][0]=='-') select (argv[t][1]) {
  1227. Xwhen 'i':        input = argv[++t]; break;
  1228. Xwhen 'o':        output = argv[++t]; break;
  1229. Xwhen 't':        Thru(); break;
  1230. Xotherwise        Ciao("Bad args");
  1231. X        }
  1232. X        else title = name = argv[t];
  1233. X    }
  1234. X    win = MyOpenWindow (&nw);
  1235. X    SetWindowTitles (win, title, banner);
  1236. X    rp = win->RPort;
  1237. X    for (t=0; t<10; t++) DrawOctave (rp, t);
  1238. X
  1239. X    ifnot    (source = CreateMSource (name, NULL))    Ciao (nomem);
  1240. X    ifnot    (dest = CreateMDest (name, NULL))    Ciao (nomem);
  1241. X    sroute = MRouteSource (source, output, NULL);
  1242. X    droute = MRouteDest (input, dest, &routeinfo);
  1243. X
  1244. X    sigs = videosig | (1L << dest->DestPort->SIGH);
  1245. X    while (logon) {
  1246. X        if (videosig != Wait (sigs))
  1247. X            while (e = GetMidiMsg (dest)) {
  1248. X            Show (e->l);
  1249. X            FreeMidiMsg (e);
  1250. X        }
  1251. X        else while (tuimsg = GetMsg (win->UserPort)) {
  1252. X            t=tuimsg->Class; s=tuimsg->Code; ReplyMsg (tuimsg);
  1253. X            select (t) {
  1254. Xwhen RAWKEY:            HitaKey(s); break;
  1255. Xwhen CLOSEWINDOW:        logon = FALSE;
  1256. X            }
  1257. X        }
  1258. X    }
  1259. X    Ciao ("Please close the window, it's cold outside.  *grin*  :-)");
  1260. X}
  1261. X
  1262. XHitaKey    (raw)
  1263. Xshort    raw; {
  1264. X    static union Event e;
  1265. X    static char    chan;
  1266. X    static FLAG amiga = FALSE;
  1267. X#ifdef    CTRL
  1268. X    static FLAG ctrl = FALSE;
  1269. X#endif
  1270. X    register UBYTE z;
  1271. X
  1272. X    z = (UBYTE) (raw & 0x7f);
  1273. X    if (z == 103) {
  1274. X        if (raw & 0x80) amiga=FALSE;
  1275. X        else amiga=TRUE;
  1276. X        return;
  1277. X    }
  1278. X#ifdef    CTRL
  1279. X    if (z == 99) {
  1280. X        if (raw & 0x80) ctrl=FALSE;
  1281. X        else ctrl=TRUE;
  1282. X        return;
  1283. X    }
  1284. X    if (ctrl) select (raw) {
  1285. Xwhen 51:/* C */    logon = FALSE;
  1286. X    }
  1287. X    else
  1288. X#endif
  1289. X    if (amiga) select (raw) {
  1290. Xwhen 0: /* ` */    Thru();
  1291. X    }
  1292. X    else if (e.p[1] = keytable[z]) {
  1293. X        e.p[0] = MS_NOTEON + chan;
  1294. X        if (raw & 0x80)    e.p[2] = 0;
  1295. X        else        e.p[2] = 64;
  1296. X/* I think 64 is the standard velocity value for non-dynamic keyboards */
  1297. X        PutMidiMsg (source, &e);
  1298. X        Show (e);
  1299. X    }
  1300. X    else select (raw) {
  1301. Xwhen 89:/*F10*/    Thru();    break;
  1302. Xwhen 43:/* # */    Jokerman();    break;
  1303. Xwhen 81:/*F2*/    chan+=2; if (chan>16) chan=1;
  1304. Xwhen 80:/*F1*/    if (--chan<0) chan=15;
  1305. X        title[0] = chan+49; Say (title);
  1306. X    }
  1307. X}
  1308. X
  1309. XThru() {
  1310. X    register UBYTE *ret;
  1311. X
  1312. X    if (thru = !thru)
  1313. X        if (troute = MRoutePublic (input, output, routeinfo))
  1314. X        ret = "Route has been established.";
  1315. X        else { thru = NO; ret = "No route could be established."; }
  1316. X    else { DeleteMRoute (troute); ret = "Route deleted."; }
  1317. X    Say (ret);
  1318. X}
  1319. X
  1320. X#define COLORS    4
  1321. X#define DEPTH    2
  1322. X#define    TOP    11
  1323. X#define    BOT    37
  1324. X#define    MID    26
  1325. X#define    LEFMARG    5
  1326. X
  1327. XShow (e)
  1328. X union Event e; {
  1329. X    register long z, o;
  1330. X    static char offs[12] =
  1331. X        { 1, 6, 11, 16, 22, 27, 32, 37, 42, 47, 52, 58 };
  1332. X    static char white[12] =
  1333. X        { 1, 0, 10, 0, 19, 28, 0, 37, 0, 46, 0, 55 };
  1334. X
  1335. X    z = e.p[2];            /* velocity */
  1336. X    if (!z || e.p[0] == MS_NOTEOFF)    SetAPen (rp, 0L);
  1337. X    else SetAPen (rp, z / (128/(COLORS-1)) + 1 );
  1338. X    if (z == 7) Jokerman();
  1339. X
  1340. X    z = e.p[1] % 12;    o = 63 * (e.p[1]-z)/12 + LEFMARG;
  1341. X    if (white[z]) RectFill (rp, o+white[z], MID+1, o+white[z]+7, BOT-1);
  1342. X    z = o + offs[z] + 1;
  1343. X    RectFill (rp, z, TOP+1, z+3, MID-1);
  1344. X}
  1345. X
  1346. XDrawOctave    (raz, x)
  1347. X   int    raz, x; {
  1348. X    x = 63*x + LEFMARG;
  1349. X    Move (raz, x, TOP);    /* box around it */
  1350. X    Draw (raz, x+63, TOP);    Draw (raz, x+63, BOT);
  1351. X    Draw (raz, x, BOT);    Draw (raz, x, TOP);
  1352. X
  1353. X    x+=9;    Move (raz, x, BOT);    DrawKey (raz, x, 3);
  1354. X    x+=9;    Move (raz, x, BOT);    DrawKey (raz, x, 2);
  1355. X    x+=9;    Move (raz, x, BOT);    Draw    (raz, x, TOP);
  1356. X    x+=9;    Move (raz, x, BOT);    DrawKey (raz, x, 4);
  1357. X    x+=9;    Move (raz, x, BOT);    DrawKey (raz, x, 3);
  1358. X    x+=9;    Move (raz, x, BOT);    DrawKey (raz, x, 2);
  1359. X}
  1360. X
  1361. XDrawKey        (raz, x, i)
  1362. X   int    raz, x, i; {
  1363. X    Draw (raz, x, MID);
  1364. X    Draw (raz, x-i, MID);
  1365. X    Draw (raz, x-i, TOP);
  1366. X    Move (raz, x, MID);
  1367. X    Draw (raz, x-i+5, MID);
  1368. X    Draw (raz, x-i+5, TOP);
  1369. X}
  1370. X
  1371. XJokerman() {
  1372. X    static UBYTE    joker = 0;
  1373. X    SetWindowTitles (win, jokes[joker++], banner);
  1374. X    if (joker==JOKES) joker = 0;
  1375. X}
  1376. X
  1377. XSay (str) char *str; { if (win) SetWindowTitles (win, -1L, str); }
  1378. X
  1379. XCiao    (str)
  1380. X  char    *str; {
  1381. X    if (str) { Say (str); Delay (25L); }
  1382. X    if (win)    CloseWindowSafely (win);
  1383. X    if (droute)    DeleteMRoute    (droute);
  1384. X    if (sroute)    DeleteMRoute    (sroute);
  1385. X    if (thru)    DeleteMRoute    (troute);
  1386. X    if (dest)    DeleteMDest    (dest);
  1387. X    if (source)    DeleteMSource    (source);
  1388. X    if (ArpBase)    CloseLibrary    (ArpBase);
  1389. X    exit (NULL);
  1390. X}
  1391. END_OF_FILE
  1392. if test 6472 -ne `wc -c <'src/MIDIkeys.c'`; then
  1393.     echo shar: \"'src/MIDIkeys.c'\" unpacked with wrong size!
  1394. fi
  1395. chmod +x 'src/MIDIkeys.c'
  1396. # end of 'src/MIDIkeys.c'
  1397. fi
  1398. if test -f 'src/MIDIrec.POW.uu' -a "${1}" != "-c" ; then 
  1399.   echo shar: Will not clobber existing file \"'src/MIDIrec.POW.uu'\"
  1400. else
  1401. echo shar: Extracting \"'src/MIDIrec.POW.uu'\" \(1708 characters\)
  1402. sed "s/^X//" >'src/MIDIrec.POW.uu' <<'END_OF_FILE'
  1403. Xbegin 700 MIDIrec.POW
  1404. XM4&]W97)7:6YD;W=S('8R+C`@J3$Y.#<@8GD@24Y/5D%44D].24-3+"!)3D,N.
  1405. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@```#O@````D@``#^````H
  1406. XM`0`````!``````E296-03U<N8P```````````0``$`H```-```4`!0*``,@`>
  1407. XMPP#P```````"`,!I@````````0```@'E`#(`FP`?``4`!?____\````0($U)_
  1408. XM1$D@4F5C;W)D97(@``##B3@`40`,`$0`$````0,``0##B0P``````,!NF```;
  1409. XM``````````(`PAI`__[__P,```4`PXD<````````````1P```$<`$0```!$`Y
  1410. XM``````````(``0``"``$``````#`;T``````````!U)E8V]R9``````*```!O
  1411. XM`0#`;U``P'&X`,!QR`#`<U@`P'-H`,!T6`````EG7U)E8V]R9``````'4F5CC
  1412. XM;W)D``````$``````0`````!``````$````````'``P`1``0`````P`!`,.)`
  1413. XM9```````PBEP````````````!`#"+U#__O__`P``!0##B70```````````!'.
  1414. XM````1P`1````$0```````````@`!```)``0``````,!T@``````````'4F5WB
  1415. XM:6YD``````H````!`,($``#!&Q@`P>%(`,(96`#"&9@`PD*P````"6=?4F5W!
  1416. XM:6YD``````=297=I;F0``````0`````!``````$``````0``PP"0`0``````#
  1417. XM`$L```##`7``PV#P````"%!R;VIE8W0``,,!$`##`I``;`##!R``````$````
  1418. XMPPB@``````("`P$```````````!H``@```````````````5,;V%D``````$`I
  1419. XM`,,"H`##!T@0<@##"3``````$```PPOP``````("`P$`````````"0!H``@`$
  1420. XM``````````````A292UR96%D``````$``,,)6`##!X`0<P##-M@`````$```;
  1421. XMPP[8``````("`P$`````````$@!H``@```````````````E3879E(&%S(```?
  1422. XM```!``###!``PS<8$'<`PT)``````!```,,^8``````"`@,!`````````!L`2
  1423. XM:``(```````````````&5W)I=&4``````0``PS<H`,,W@````,-,:`##3X@0_
  1424. XM`````````````@(#`0`````````D`&@`"```````````````!5%U:70`````$
  1425. XM`0``PTR0`,-":````,-1V```````````!@(#`0``````(0`#`'@`"```````I
  1426. XM````````$"!A<F4@>6]U('-U<F4_(``````!``##3Z@!``!2````.0```,.)V
  1427. XMD``````````&5&]O;',``,-2``##81`0+@##B;``````$```PXG8``````("B
  1428. XM`P$```````````"```@```````````````5(96QP``````$``,.*(`##BC@0=
  1429. XM8`##B?@`````$`````````````("`P$`````````"0"```@`````````````-
  1430. X3``Q4;V=G;&4@5&AR=0`````!``("V
  1431. X``
  1432. Xend
  1433. Xsize 1189
  1434. END_OF_FILE
  1435. if test 1708 -ne `wc -c <'src/MIDIrec.POW.uu'`; then
  1436.     echo shar: \"'src/MIDIrec.POW.uu'\" unpacked with wrong size!
  1437. fi
  1438. # end of 'src/MIDIrec.POW.uu'
  1439. fi
  1440. if test -f 'src/MIDIrec.c' -a "${1}" != "-c" ; then 
  1441.   echo shar: Will not clobber existing file \"'src/MIDIrec.c'\"
  1442. else
  1443. echo shar: Extracting \"'src/MIDIrec.c'\" \(5581 characters\)
  1444. sed "s/^X//" >'src/MIDIrec.c' <<'END_OF_FILE'
  1445. X/*        M    I    D    I    R    E    C
  1446. X
  1447. X                  Little MIDI Recorder
  1448. X        Written, arranged, produced by Carl Ch. v. Loesch.
  1449. X
  1450. X    V0.1    February'89,    V0.2    August'89,    V0.3    July'90
  1451. X    V1.0    August'90.
  1452. X#define    DEBUG
  1453. X*/
  1454. X#include "Lynx.h"
  1455. Xextern    struct    Menu        Menu1;
  1456. Xextern    struct    NewWindow    NewWindowStructure1;
  1457. XEXPORT    char    ret[80];
  1458. X
  1459. X#include <MIDI/MIDI.h>
  1460. XEXPORT    struct    MidiBase    *MidiBase;
  1461. XEXPORT    struct    MSource        *source=0;
  1462. XEXPORT    struct    MDest        *dest=0;
  1463. XEXPORT    struct    MRoute        *droute=0, *sroute=0, *troute;
  1464. Xstatic    struct    MRouteInfo    routeinfo = { MMF_CHAN + MMF_SYSRT, 0xffff };
  1465. X
  1466. XEXPORT    char    prgname[] =    "Recorder",    *name  = prgname;
  1467. XEXPORT    char    midiin[] =    "MidiIn",    *input = midiin;
  1468. XEXPORT    char    midiout[] =    "MidiOut",    *output= midiout;
  1469. X
  1470. X#include <libraries/ARPbase.h>
  1471. XEXPORT    struct    ArpBase        *ArpBase;
  1472. XEXPORT    struct    IntuitionBase    *IntuitionBase;
  1473. XEXPORT    char    file[FCHARS+DSIZE+1]="", dir[DSIZE+1]="Sequences",
  1474. X        loadname[FCHARS+1]="Hello", savename[FCHARS+1]="Hello";
  1475. XEXPORT    struct    FileRequester    *freq;
  1476. XEXPORT    struct    Window        *win;
  1477. X
  1478. X#define    TAPELEN        15000
  1479. XEXPORT    struct Tape {
  1480. X    union Event event;
  1481. X    short clock;
  1482. X} *tape;
  1483. X
  1484. X#define    RECORDERPRIO    3L
  1485. XEXPORT    char    banner[] =
  1486. X "*| Little MIDI Recorder V1.0 by Carlo \"Lynx\" von Loesch (c)90 |*";
  1487. XEXPORT    char    *title = banner;
  1488. XEXPORT    char    nomem[] = "Out of RAM";
  1489. XEXPORT    ULONG    tc = 0, tl = 0, ck = 0, nextck, lastck;
  1490. XEXPORT    FLAG    on = YES, thru = NO, play = NO, rec = NO;
  1491. XEXPORT    long    midisig, videosig, sigs;
  1492. X
  1493. Xmain(argc, argv) long argc; char *argv[]; {
  1494. X    register    long    t;
  1495. X    register    short    s;
  1496. X    register    union Event    *e;
  1497. X
  1498. X    ifnot (ArpBase = OpenLibrary("arp.library",ArpVersion))
  1499. X        Ciao("No ARP.Library");
  1500. X    IntuitionBase =    ArpBase -> IntuiBase;
  1501. X    ifnot (MidiBase = ArpOpenLibrary (MIDINAME,MIDIVERSION))
  1502. X        Ciao ("No MIDI.Library");
  1503. X    ifnot (tape = ArpAlloc (TAPELEN * sizeof(struct Tape)))
  1504. X        Ciao (nomem);
  1505. X
  1506. X    for (t=1; t<argc; t++) {
  1507. X        if (argv[t][0]=='-') select (argv[t][1]) {
  1508. X            when 'i':    input = argv[++t]; break;
  1509. X            when 'o':    output = argv[++t]; break;
  1510. X            when 't':    Thru(); break;
  1511. X            otherwise    Ciao("Bad args");
  1512. X        }
  1513. X        else title = name = argv[t];
  1514. X    }
  1515. X    ifnot (source = CreateMSource (name, NULL))    Ciao (nomem);
  1516. X    ifnot (sroute = MRouteSource (source, output, NULL))
  1517. X        Ciao ("No route out");
  1518. X    ifnot (dest = CreateMDest (name, NULL))        Ciao (nomem);
  1519. X    ifnot (droute = MRouteDest (input, dest, &routeinfo))
  1520. X        Ciao ("No route in");
  1521. X    midisig = 1L<<dest->DestPort->SIGH;
  1522. X
  1523. X    win = MyOpenWindow(&NewWindowStructure1); Say (banner);
  1524. X    SetMenuStrip (win, &Menu1);
  1525. X    sigs = videosig | midisig;
  1526. X
  1527. X    ifnot (freq = ArpAllocFreq()) Ciao (nomem); 
  1528. X    freq->fr_Dir = dir; freq->fr_Window = win;
  1529. X    freq -> fr_FuncFlags = FRF_NewWindFunc;
  1530. X
  1531. X#ifdef RECORDERPRIO
  1532. X    SetTaskPri(FindTask((char *) 0L), RECORDERPRIO);
  1533. X#endif
  1534. X    while (on) {
  1535. X        t = Wait (sigs);
  1536. X        if (t == midisig) while (e = GetMidiMsg (dest)) {
  1537. X            HandleMIDI (e->l); FreeMidiMsg (e);
  1538. X        } else MyCheckTui();
  1539. X    }
  1540. X    Ciao (NULL);
  1541. X}
  1542. X
  1543. XHandleMIDI (e) union Event e; {
  1544. X    if (e.p[0] > 0xf0) select (e.p[0]) {
  1545. Xwhen MS_CLOCK:        if (play) PlayIt(); break;
  1546. Xwhen MS_START:        Rewind();
  1547. Xwhen MS_CONTINUE:    play=YES; LBUG ("PLAY at clk", ck); break;
  1548. Xwhen MS_STOP:        play=NO; LBUG ("STOP at clk", ck); break;
  1549. Xotherwise        XBUG ("Weird Event", e.l);
  1550. X    }
  1551. X    else if (rec && play && tl < TAPELEN) {
  1552. X#ifdef TOUCHSTART
  1553. X        if (!tl) ck=1;
  1554. X    /* start counting from first input, ignoring sync */
  1555. X#endif
  1556. X        tape[tl].clock = ck - lastck;
  1557. X        tape[tl++].event = e;
  1558. X        lastck = ck;
  1559. X    }
  1560. X}
  1561. X
  1562. XPlayIt() {
  1563. X    if (!rec && (ck == nextck)) {
  1564. X        PutMidiMsg (source, &tape[tc++].event);
  1565. X        while (tape[tc].clock == 0)
  1566. X            PutMidiMsg (source, &tape[tc++].event);
  1567. X        if (tc < tl) nextck = ck + tape[tc].clock;
  1568. X        else nextck = 0;
  1569. X    }
  1570. X    ck++;
  1571. X}
  1572. X
  1573. XThru() {
  1574. X    if (thru = !thru)
  1575. X      if (troute = MRoutePublic (input, output, routeinfo))
  1576. X        SPrintf (ret,
  1577. X"Route between %s and %s has been established.", input, output);
  1578. X      else { thru = NO; SPrintf (ret,
  1579. X"No route between %s and %s could be established.", input, output);
  1580. X      }
  1581. X    else {
  1582. X        DeleteMRoute (troute);
  1583. X        SPrintf (ret, "Ok. No more route between %s and %s.",
  1584. X            input, output);
  1585. X    }
  1586. X    Say (ret);
  1587. X}
  1588. X
  1589. XRecord() {
  1590. X    rec=!rec;
  1591. X    FBUG ("RECORD", rec);
  1592. X    Rewind();
  1593. X}
  1594. XRewind() {
  1595. X    tc=0; ck=1; nextck=(ULONG) tape[0].clock; lastck=1;
  1596. X    if (rec) tl=0;
  1597. X    LBUG ("REWIND with tl", tl);
  1598. X}
  1599. XSaveIt() {
  1600. X    if (tl) Save (file, &tape[0],(long) tl*sizeof(struct Tape));
  1601. X}
  1602. XLoadIt() {
  1603. X    play=NO; Rewind();
  1604. X    tl = Load (file, &tape[0],(long) TAPELEN*sizeof(struct Tape))
  1605. X        / sizeof(struct Tape);
  1606. X}
  1607. XHelp() {
  1608. X    SPrintf (ret, "Clock: %ld, Counter: %ld, SeqLength: %ld.",
  1609. X        ck, tc, tl); Say (ret);
  1610. X}
  1611. X
  1612. XMyCheckTui() {
  1613. X    register struct    IntuiMessage    *tuimsg;
  1614. X    register ULONG    class, obj;
  1615. X    register USHORT    code;
  1616. X
  1617. X    while (tuimsg = GetMsg (win->UserPort)) {
  1618. X        class =    tuimsg->Class;
  1619. X        code =    tuimsg->Code;
  1620. X        obj=    tuimsg->IAddress;    ReplyMsg (tuimsg);
  1621. X        switch (class) {
  1622. Xcase MENUPICK:        DoMenu(code);        break;
  1623. Xcase GADGETUP:        HandleEvent (obj);    break;
  1624. Xcase CLOSEWINDOW:    Ciao (NULL);
  1625. X        }
  1626. X    }
  1627. X}
  1628. X
  1629. XDoMenu (code) USHORT code; {
  1630. X    NBUG (" MenuCode", code);
  1631. X    select (MENUNUM(code)) {
  1632. Xwhen 0:        select (ITEMNUM(code)) {
  1633. X    when 0:        LoadAs(); break;
  1634. X    when 1:        LoadIt(); break;
  1635. X    when 2:        SaveAs(); break;
  1636. X    when 3:        SaveIt(); break;
  1637. X    when 4:        Ciao(NULL);
  1638. X        } break;
  1639. Xwhen 1:        select (ITEMNUM(code)) {
  1640. X    when 0:        Help(); break;
  1641. X    when 1:        Thru();
  1642. X        }
  1643. X    }
  1644. X}
  1645. X
  1646. XSay (str) char *str; { if (win) SetWindowTitles (win, -1L, str); }
  1647. X
  1648. XCiao (str)  char *str; {
  1649. X    if (win)    CloseWindowSafely (win);
  1650. X    if (droute)    DeleteMRoute    (droute);
  1651. X    if (sroute)    DeleteMRoute    (sroute);
  1652. X    if (thru)    DeleteMRoute    (troute);
  1653. X    if (dest)    DeleteMDest    (dest);
  1654. X    if (source)    DeleteMSource    (source);
  1655. X    if (ArpBase) {
  1656. X        if (str)    Puts(str);
  1657. X        CloseLibrary    (ArpBase);
  1658. X    }
  1659. X    exit (str ? 4404L : 0L);
  1660. X}
  1661. END_OF_FILE
  1662. if test 5581 -ne `wc -c <'src/MIDIrec.c'`; then
  1663.     echo shar: \"'src/MIDIrec.c'\" unpacked with wrong size!
  1664. fi
  1665. chmod +x 'src/MIDIrec.c'
  1666. # end of 'src/MIDIrec.c'
  1667. fi
  1668. if test -f 'src/RecPOW.c' -a "${1}" != "-c" ; then 
  1669.   echo shar: Will not clobber existing file \"'src/RecPOW.c'\"
  1670. else
  1671. echo shar: Extracting \"'src/RecPOW.c'\" \(3339 characters\)
  1672. sed "s/^X//" >'src/RecPOW.c' <<'END_OF_FILE'
  1673. X
  1674. XSHORT BorderVectors1[] = {
  1675. X    0,0,
  1676. X    71,0,
  1677. X    71,17,
  1678. X    0,17,
  1679. X    0,0
  1680. X};
  1681. Xstruct Border Border1 = {
  1682. X    -2,-1,
  1683. X    3,0,JAM1,
  1684. X    5,
  1685. X    BorderVectors1,
  1686. X    NULL
  1687. X};
  1688. X
  1689. Xstruct IntuiText IText1 = {
  1690. X    2,0,JAM2,
  1691. X    9,4,
  1692. X    NULL,
  1693. X    (UBYTE *)"Rewind",
  1694. X    NULL
  1695. X};
  1696. X
  1697. Xstruct Gadget g_Rewind = {
  1698. X    NULL,
  1699. X    7,12,
  1700. X    68,16,
  1701. X    NULL,
  1702. X    RELVERIFY,
  1703. X    BOOLGADGET,
  1704. X    (APTR)&Border1,
  1705. X    NULL,
  1706. X    &IText1,
  1707. X    NULL,
  1708. X    NULL,
  1709. X    NULL,
  1710. X    NULL
  1711. X};
  1712. X
  1713. XSHORT BorderVectors2[] = {
  1714. X    0,0,
  1715. X    71,0,
  1716. X    71,17,
  1717. X    0,17,
  1718. X    0,0
  1719. X};
  1720. Xstruct Border Border2 = {
  1721. X    -2,-1,
  1722. X    3,0,JAM1,
  1723. X    5,
  1724. X    BorderVectors2,
  1725. X    NULL
  1726. X};
  1727. X
  1728. Xstruct IntuiText IText2 = {
  1729. X    2,0,JAM2,
  1730. X    8,4,
  1731. X    NULL,
  1732. X    (UBYTE *)"Record",
  1733. X    NULL
  1734. X};
  1735. X
  1736. Xstruct Gadget g_Record = {
  1737. X    &g_Rewind,
  1738. X    81,12,
  1739. X    68,16,
  1740. X    NULL,
  1741. X    RELVERIFY+TOGGLESELECT,
  1742. X    BOOLGADGET,
  1743. X    (APTR)&Border2,
  1744. X    NULL,
  1745. X    &IText2,
  1746. X    NULL,
  1747. X    NULL,
  1748. X    NULL,
  1749. X    NULL
  1750. X};
  1751. X
  1752. X#define GadgetList1 g_Record
  1753. X
  1754. Xstruct IntuiText IText3 = {
  1755. X    3,1,COMPLEMENT,
  1756. X    0,0,
  1757. X    NULL,
  1758. X    (UBYTE *)"Toggle Thru",
  1759. X    NULL
  1760. X};
  1761. X
  1762. Xstruct MenuItem MenuItem2 = {
  1763. X    NULL,
  1764. X    0,9,
  1765. X    128,8,
  1766. X    ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHBOX,
  1767. X    0,
  1768. X    (APTR)&IText3,
  1769. X    NULL,
  1770. X    '`',
  1771. X    NULL,
  1772. X    MENUNULL
  1773. X};
  1774. X
  1775. Xstruct IntuiText IText4 = {
  1776. X    3,1,COMPLEMENT,
  1777. X    0,0,
  1778. X    NULL,
  1779. X    (UBYTE *)"Help",
  1780. X    NULL
  1781. X};
  1782. X
  1783. Xstruct MenuItem MenuItem1 = {
  1784. X    &MenuItem2,
  1785. X    0,0,
  1786. X    128,8,
  1787. X    ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHBOX,
  1788. X    0,
  1789. X    (APTR)&IText4,
  1790. X    NULL,
  1791. X    '.',
  1792. X    NULL,
  1793. X    MENUNULL
  1794. X};
  1795. X
  1796. Xstruct Menu Menu2 = {
  1797. X    NULL,
  1798. X    82,0,
  1799. X    57,0,
  1800. X    MENUENABLED,
  1801. X    "Tools",
  1802. X    &MenuItem1
  1803. X};
  1804. X
  1805. Xstruct IntuiText IText5 = {
  1806. X    3,1,COMPLEMENT,
  1807. X    0,0,
  1808. X    NULL,
  1809. X    (UBYTE *)" are you sure? ",
  1810. X    NULL
  1811. X};
  1812. X
  1813. Xstruct MenuItem SubItem1 = {
  1814. X    NULL,
  1815. X    33,3,
  1816. X    120,8,
  1817. X    ITEMTEXT+ITEMENABLED+HIGHBOX,
  1818. X    0,
  1819. X    (APTR)&IText5,
  1820. X    NULL,
  1821. X    NULL,
  1822. X    NULL,
  1823. X    MENUNULL
  1824. X};
  1825. X
  1826. Xstruct IntuiText IText6 = {
  1827. X    3,1,COMPLEMENT,
  1828. X    0,0,
  1829. X    NULL,
  1830. X    (UBYTE *)"Quit",
  1831. X    NULL
  1832. X};
  1833. X
  1834. Xstruct MenuItem MenuItem7 = {
  1835. X    NULL,
  1836. X    0,36,
  1837. X    104,8,
  1838. X    ITEMTEXT+ITEMENABLED+HIGHBOX,
  1839. X    0,
  1840. X    (APTR)&IText6,
  1841. X    NULL,
  1842. X    NULL,
  1843. X    &SubItem1,
  1844. X    MENUNULL
  1845. X};
  1846. X
  1847. Xstruct IntuiText IText7 = {
  1848. X    3,1,COMPLEMENT,
  1849. X    0,0,
  1850. X    NULL,
  1851. X    (UBYTE *)"Write",
  1852. X    NULL
  1853. X};
  1854. X
  1855. Xstruct MenuItem MenuItem6 = {
  1856. X    &MenuItem7,
  1857. X    0,27,
  1858. X    104,8,
  1859. X    ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHBOX,
  1860. X    0,
  1861. X    (APTR)&IText7,
  1862. X    NULL,
  1863. X    'w',
  1864. X    NULL,
  1865. X    MENUNULL
  1866. X};
  1867. X
  1868. Xstruct IntuiText IText8 = {
  1869. X    3,1,COMPLEMENT,
  1870. X    0,0,
  1871. X    NULL,
  1872. X    (UBYTE *)"Save as ",
  1873. X    NULL
  1874. X};
  1875. X
  1876. Xstruct MenuItem MenuItem5 = {
  1877. X    &MenuItem6,
  1878. X    0,18,
  1879. X    104,8,
  1880. X    ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHBOX,
  1881. X    0,
  1882. X    (APTR)&IText8,
  1883. X    NULL,
  1884. X    's',
  1885. X    NULL,
  1886. X    MENUNULL
  1887. X};
  1888. X
  1889. Xstruct IntuiText IText9 = {
  1890. X    3,1,COMPLEMENT,
  1891. X    0,0,
  1892. X    NULL,
  1893. X    (UBYTE *)"Re-read",
  1894. X    NULL
  1895. X};
  1896. X
  1897. Xstruct MenuItem MenuItem4 = {
  1898. X    &MenuItem5,
  1899. X    0,9,
  1900. X    104,8,
  1901. X    ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHBOX,
  1902. X    0,
  1903. X    (APTR)&IText9,
  1904. X    NULL,
  1905. X    'r',
  1906. X    NULL,
  1907. X    MENUNULL
  1908. X};
  1909. X
  1910. Xstruct IntuiText IText10 = {
  1911. X    3,1,COMPLEMENT,
  1912. X    0,0,
  1913. X    NULL,
  1914. X    (UBYTE *)"Load",
  1915. X    NULL
  1916. X};
  1917. X
  1918. Xstruct MenuItem MenuItem3 = {
  1919. X    &MenuItem4,
  1920. X    0,0,
  1921. X    104,8,
  1922. X    ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHBOX,
  1923. X    0,
  1924. X    (APTR)&IText10,
  1925. X    NULL,
  1926. X    'l',
  1927. X    NULL,
  1928. X    MENUNULL
  1929. X};
  1930. X
  1931. Xstruct Menu Menu1 = {
  1932. X    &Menu2,
  1933. X    0,0,
  1934. X    75,0,
  1935. X    MENUENABLED,
  1936. X    "Project",
  1937. X    &MenuItem3
  1938. X};
  1939. X
  1940. X#define MenuList1 Menu1
  1941. X
  1942. Xstruct NewWindow NewWindowStructure1 = {
  1943. X    485,50,
  1944. X    155,31,
  1945. X    0,2,
  1946. X    GADGETUP+MENUPICK+CLOSEWINDOW,
  1947. X    WINDOWDRAG+WINDOWCLOSE+ACTIVATE,
  1948. X    &g_Record,
  1949. X    NULL,
  1950. X    (UBYTE *)" MIDI Recorder ",
  1951. X    NULL,
  1952. X    NULL,
  1953. X    5,5,
  1954. X    640,200,
  1955. X    WBENCHSCREEN
  1956. X};
  1957. X
  1958. X
  1959. Xvoid HandleEvent(object)
  1960. XAPTR object;
  1961. X{
  1962. X  if (object == (APTR)&g_Record) { Record(object); return; }
  1963. X  if (object == (APTR)&g_Rewind) { Rewind(object); return; }
  1964. X}
  1965. X#define HANDLEEVENT HandleEvent
  1966. X
  1967. X/* end of PowerWindows source generation */
  1968. END_OF_FILE
  1969. if test 3339 -ne `wc -c <'src/RecPOW.c'`; then
  1970.     echo shar: \"'src/RecPOW.c'\" unpacked with wrong size!
  1971. fi
  1972. chmod +x 'src/RecPOW.c'
  1973. # end of 'src/RecPOW.c'
  1974. fi
  1975. echo shar: End of archive 1 \(of 1\).
  1976. cp /dev/null ark1isdone
  1977. MISSING=""
  1978. for I in 1 ; do
  1979.     if test ! -f ark${I}isdone ; then
  1980.     MISSING="${MISSING} ${I}"
  1981.     fi
  1982. done
  1983. if test "${MISSING}" = "" ; then
  1984.     echo You have the archive.
  1985.     rm -f ark[1-9]isdone
  1986. else
  1987.     echo You still need to unpack the following archives:
  1988.     echo "        " ${MISSING}
  1989. fi
  1990. ##  End of shell archive.
  1991. exit 0
  1992. -- 
  1993. Mail submissions (sources or binaries) to <amiga@uunet.uu.net>.
  1994. Mail comments to the moderator at <amiga-request@uunet.uu.net>.
  1995. Post requests for sources, and general discussion to comp.sys.amiga.
  1996.